#!/bin/bash
>1.txt
while true
do
	echo $((RANDOM%32+1)) >>1.txt
	stop_key=$(cat 1.txt |sort|uniq|wc -l)
	if (( stop_key == 6 ))
	then
		red_lucky_num=($(cat 1.txt|sort|uniq))
		blue_lucky_num=$((RANDOM%16+1))
		echo "red ball lucky number is ${red_lucky_num[@]} blue ball lucky number is $blue_lucky_num"
		break
	fi 
done
